<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Pragma" content="no-cache"/>
    <META http-equiv="Cache-Control" content="no-cache, must-revalidate">
    <META http-equiv="expires" content="0">
    <title>体温单</title>
    <style>
        #main{
            margin:0;
            width:1000px;
            height:1414px;
        }
    </style>
</head>
<body style="background-color: white;">
<div id="main"></div>
<img src="" id="main_img">
<div id="test"></div>
<script src="/assets/libs/layui/layui.min.js?v=1" charset="UTF-8"></script>
<script src="/assets/js/layui-config.min.js?v=1" charset="UTF-8"></script>
<script src="./VitalSignUtil.js?v=1" charset="UTF-8"></script>
<script>
    layui.use(['jquery','zrender','zdraw','http'],function(){
        var $ = layui.jquery;
        var http = layui.http;

        function toImg() {
            var canvas = document.querySelector('#main canvas');
            if (canvas) {
                var img = canvas.toDataURL("image/png");
                document.querySelector('#main_img').src = img;
            }
        }
        $(function () {
            var params = http.getUrlParams(window.location.search);
            http.get('vitalSign/getVitalSign',params,function(res){
                if(res.ok){
                    var vsUtil = new VitalSignUtil(res.data);
                    vsUtil.doDraw({elem:'main',x: 10, y: 10});
                }
            });
        });
    });
// http://localhost:8081/views/patient/vitalSign.html?code=3993407&cureNo=0002175651
</script>
</body>
</html>